Optimal. Leaf size=197 \[ \frac {37 a^{3/2} \tanh ^{-1}\left (\frac {\sqrt {a} \cos (c+d x)}{\sqrt {a+a \sin (c+d x)}}\right )}{8 d}-\frac {8 a^2 \cos (c+d x)}{3 d \sqrt {a+a \sin (c+d x)}}+\frac {29 a^2 \cot (c+d x)}{24 d \sqrt {a+a \sin (c+d x)}}-\frac {2 a \cos (c+d x) \sqrt {a+a \sin (c+d x)}}{3 d}-\frac {a \cot (c+d x) \csc (c+d x) \sqrt {a+a \sin (c+d x)}}{4 d}-\frac {\cot (c+d x) \csc ^2(c+d x) (a+a \sin (c+d x))^{3/2}}{3 d} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.32, antiderivative size = 197, normalized size of antiderivative = 1.00, number of steps
used = 8, number of rules used = 8, integrand size = 23, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.348, Rules used = {2797, 2726,
2725, 3123, 3054, 3059, 2852, 212} \begin {gather*} \frac {37 a^{3/2} \tanh ^{-1}\left (\frac {\sqrt {a} \cos (c+d x)}{\sqrt {a \sin (c+d x)+a}}\right )}{8 d}-\frac {8 a^2 \cos (c+d x)}{3 d \sqrt {a \sin (c+d x)+a}}+\frac {29 a^2 \cot (c+d x)}{24 d \sqrt {a \sin (c+d x)+a}}-\frac {2 a \cos (c+d x) \sqrt {a \sin (c+d x)+a}}{3 d}-\frac {\cot (c+d x) \csc ^2(c+d x) (a \sin (c+d x)+a)^{3/2}}{3 d}-\frac {a \cot (c+d x) \csc (c+d x) \sqrt {a \sin (c+d x)+a}}{4 d} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 212
Rule 2725
Rule 2726
Rule 2797
Rule 2852
Rule 3054
Rule 3059
Rule 3123
Rubi steps
\begin {align*} \int \cot ^4(c+d x) (a+a \sin (c+d x))^{3/2} \, dx &=\int (a+a \sin (c+d x))^{3/2} \, dx+\int \csc ^4(c+d x) (a+a \sin (c+d x))^{3/2} \left (1-2 \sin ^2(c+d x)\right ) \, dx\\ &=-\frac {2 a \cos (c+d x) \sqrt {a+a \sin (c+d x)}}{3 d}-\frac {\cot (c+d x) \csc ^2(c+d x) (a+a \sin (c+d x))^{3/2}}{3 d}+\frac {\int \csc ^3(c+d x) \left (\frac {3 a}{2}-\frac {11}{2} a \sin (c+d x)\right ) (a+a \sin (c+d x))^{3/2} \, dx}{3 a}+\frac {1}{3} (4 a) \int \sqrt {a+a \sin (c+d x)} \, dx\\ &=-\frac {8 a^2 \cos (c+d x)}{3 d \sqrt {a+a \sin (c+d x)}}-\frac {2 a \cos (c+d x) \sqrt {a+a \sin (c+d x)}}{3 d}-\frac {a \cot (c+d x) \csc (c+d x) \sqrt {a+a \sin (c+d x)}}{4 d}-\frac {\cot (c+d x) \csc ^2(c+d x) (a+a \sin (c+d x))^{3/2}}{3 d}+\frac {\int \csc ^2(c+d x) \sqrt {a+a \sin (c+d x)} \left (-\frac {29 a^2}{4}-\frac {41}{4} a^2 \sin (c+d x)\right ) \, dx}{6 a}\\ &=-\frac {8 a^2 \cos (c+d x)}{3 d \sqrt {a+a \sin (c+d x)}}+\frac {29 a^2 \cot (c+d x)}{24 d \sqrt {a+a \sin (c+d x)}}-\frac {2 a \cos (c+d x) \sqrt {a+a \sin (c+d x)}}{3 d}-\frac {a \cot (c+d x) \csc (c+d x) \sqrt {a+a \sin (c+d x)}}{4 d}-\frac {\cot (c+d x) \csc ^2(c+d x) (a+a \sin (c+d x))^{3/2}}{3 d}-\frac {1}{16} (37 a) \int \csc (c+d x) \sqrt {a+a \sin (c+d x)} \, dx\\ &=-\frac {8 a^2 \cos (c+d x)}{3 d \sqrt {a+a \sin (c+d x)}}+\frac {29 a^2 \cot (c+d x)}{24 d \sqrt {a+a \sin (c+d x)}}-\frac {2 a \cos (c+d x) \sqrt {a+a \sin (c+d x)}}{3 d}-\frac {a \cot (c+d x) \csc (c+d x) \sqrt {a+a \sin (c+d x)}}{4 d}-\frac {\cot (c+d x) \csc ^2(c+d x) (a+a \sin (c+d x))^{3/2}}{3 d}+\frac {\left (37 a^2\right ) \text {Subst}\left (\int \frac {1}{a-x^2} \, dx,x,\frac {a \cos (c+d x)}{\sqrt {a+a \sin (c+d x)}}\right )}{8 d}\\ &=\frac {37 a^{3/2} \tanh ^{-1}\left (\frac {\sqrt {a} \cos (c+d x)}{\sqrt {a+a \sin (c+d x)}}\right )}{8 d}-\frac {8 a^2 \cos (c+d x)}{3 d \sqrt {a+a \sin (c+d x)}}+\frac {29 a^2 \cot (c+d x)}{24 d \sqrt {a+a \sin (c+d x)}}-\frac {2 a \cos (c+d x) \sqrt {a+a \sin (c+d x)}}{3 d}-\frac {a \cot (c+d x) \csc (c+d x) \sqrt {a+a \sin (c+d x)}}{4 d}-\frac {\cot (c+d x) \csc ^2(c+d x) (a+a \sin (c+d x))^{3/2}}{3 d}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.92, size = 334, normalized size = 1.70 \begin {gather*} -\frac {a \csc ^{10}\left (\frac {1}{2} (c+d x)\right ) \sqrt {a (1+\sin (c+d x))} \left (-276 \cos \left (\frac {1}{2} (c+d x)\right )+326 \cos \left (\frac {3}{2} (c+d x)\right )+78 \cos \left (\frac {5}{2} (c+d x)\right )-72 \cos \left (\frac {7}{2} (c+d x)\right )+8 \cos \left (\frac {9}{2} (c+d x)\right )+276 \sin \left (\frac {1}{2} (c+d x)\right )-333 \log \left (1+\cos \left (\frac {1}{2} (c+d x)\right )-\sin \left (\frac {1}{2} (c+d x)\right )\right ) \sin (c+d x)+333 \log \left (1-\cos \left (\frac {1}{2} (c+d x)\right )+\sin \left (\frac {1}{2} (c+d x)\right )\right ) \sin (c+d x)+326 \sin \left (\frac {3}{2} (c+d x)\right )-78 \sin \left (\frac {5}{2} (c+d x)\right )+111 \log \left (1+\cos \left (\frac {1}{2} (c+d x)\right )-\sin \left (\frac {1}{2} (c+d x)\right )\right ) \sin (3 (c+d x))-111 \log \left (1-\cos \left (\frac {1}{2} (c+d x)\right )+\sin \left (\frac {1}{2} (c+d x)\right )\right ) \sin (3 (c+d x))-72 \sin \left (\frac {7}{2} (c+d x)\right )-8 \sin \left (\frac {9}{2} (c+d x)\right )\right )}{24 d \left (1+\cot \left (\frac {1}{2} (c+d x)\right )\right ) \left (\csc ^2\left (\frac {1}{4} (c+d x)\right )-\sec ^2\left (\frac {1}{4} (c+d x)\right )\right )^3} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 6.11, size = 196, normalized size = 0.99
method | result | size |
default | \(\frac {\left (1+\sin \left (d x +c \right )\right ) \sqrt {-a \left (\sin \left (d x +c \right )-1\right )}\, \left (16 \left (-a \left (\sin \left (d x +c \right )-1\right )\right )^{\frac {3}{2}} a^{\frac {3}{2}} \left (\sin ^{3}\left (d x +c \right )\right )-96 a^{\frac {5}{2}} \sqrt {-a \left (\sin \left (d x +c \right )-1\right )}\, \left (\sin ^{3}\left (d x +c \right )\right )+111 \arctanh \left (\frac {\sqrt {-a \left (\sin \left (d x +c \right )-1\right )}}{\sqrt {a}}\right ) a^{3} \left (\sin ^{3}\left (d x +c \right )\right )+15 \left (-a \left (\sin \left (d x +c \right )-1\right )\right )^{\frac {5}{2}} \sqrt {a}-8 \left (-a \left (\sin \left (d x +c \right )-1\right )\right )^{\frac {3}{2}} a^{\frac {3}{2}}-15 \sqrt {-a \left (\sin \left (d x +c \right )-1\right )}\, a^{\frac {5}{2}}\right )}{24 a^{\frac {3}{2}} \sin \left (d x +c \right )^{3} \cos \left (d x +c \right ) \sqrt {a +a \sin \left (d x +c \right )}\, d}\) | \(196\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Failed to integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [B] Leaf count of result is larger than twice the leaf count of optimal. 424 vs.
\(2 (169) = 338\).
time = 0.36, size = 424, normalized size = 2.15 \begin {gather*} \frac {111 \, {\left (a \cos \left (d x + c\right )^{4} - 2 \, a \cos \left (d x + c\right )^{2} - {\left (a \cos \left (d x + c\right )^{3} + a \cos \left (d x + c\right )^{2} - a \cos \left (d x + c\right ) - a\right )} \sin \left (d x + c\right ) + a\right )} \sqrt {a} \log \left (\frac {a \cos \left (d x + c\right )^{3} - 7 \, a \cos \left (d x + c\right )^{2} + 4 \, {\left (\cos \left (d x + c\right )^{2} + {\left (\cos \left (d x + c\right ) + 3\right )} \sin \left (d x + c\right ) - 2 \, \cos \left (d x + c\right ) - 3\right )} \sqrt {a \sin \left (d x + c\right ) + a} \sqrt {a} - 9 \, a \cos \left (d x + c\right ) + {\left (a \cos \left (d x + c\right )^{2} + 8 \, a \cos \left (d x + c\right ) - a\right )} \sin \left (d x + c\right ) - a}{\cos \left (d x + c\right )^{3} + \cos \left (d x + c\right )^{2} + {\left (\cos \left (d x + c\right )^{2} - 1\right )} \sin \left (d x + c\right ) - \cos \left (d x + c\right ) - 1}\right ) - 4 \, {\left (16 \, a \cos \left (d x + c\right )^{5} - 64 \, a \cos \left (d x + c\right )^{4} - 17 \, a \cos \left (d x + c\right )^{3} + 165 \, a \cos \left (d x + c\right )^{2} + 9 \, a \cos \left (d x + c\right ) - {\left (16 \, a \cos \left (d x + c\right )^{4} + 80 \, a \cos \left (d x + c\right )^{3} + 63 \, a \cos \left (d x + c\right )^{2} - 102 \, a \cos \left (d x + c\right ) - 93 \, a\right )} \sin \left (d x + c\right ) - 93 \, a\right )} \sqrt {a \sin \left (d x + c\right ) + a}}{96 \, {\left (d \cos \left (d x + c\right )^{4} - 2 \, d \cos \left (d x + c\right )^{2} - {\left (d \cos \left (d x + c\right )^{3} + d \cos \left (d x + c\right )^{2} - d \cos \left (d x + c\right ) - d\right )} \sin \left (d x + c\right ) + d\right )}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F(-1)] Timed out
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Timed out} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 0.55, size = 246, normalized size = 1.25 \begin {gather*} -\frac {\sqrt {2} {\left (128 \, a \mathrm {sgn}\left (\cos \left (-\frac {1}{4} \, \pi + \frac {1}{2} \, d x + \frac {1}{2} \, c\right )\right ) \sin \left (-\frac {1}{4} \, \pi + \frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} - 111 \, \sqrt {2} a \log \left (\frac {{\left | -2 \, \sqrt {2} + 4 \, \sin \left (-\frac {1}{4} \, \pi + \frac {1}{2} \, d x + \frac {1}{2} \, c\right ) \right |}}{{\left | 2 \, \sqrt {2} + 4 \, \sin \left (-\frac {1}{4} \, \pi + \frac {1}{2} \, d x + \frac {1}{2} \, c\right ) \right |}}\right ) \mathrm {sgn}\left (\cos \left (-\frac {1}{4} \, \pi + \frac {1}{2} \, d x + \frac {1}{2} \, c\right )\right ) - 384 \, a \mathrm {sgn}\left (\cos \left (-\frac {1}{4} \, \pi + \frac {1}{2} \, d x + \frac {1}{2} \, c\right )\right ) \sin \left (-\frac {1}{4} \, \pi + \frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - \frac {4 \, {\left (60 \, a \mathrm {sgn}\left (\cos \left (-\frac {1}{4} \, \pi + \frac {1}{2} \, d x + \frac {1}{2} \, c\right )\right ) \sin \left (-\frac {1}{4} \, \pi + \frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} - 16 \, a \mathrm {sgn}\left (\cos \left (-\frac {1}{4} \, \pi + \frac {1}{2} \, d x + \frac {1}{2} \, c\right )\right ) \sin \left (-\frac {1}{4} \, \pi + \frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} - 15 \, a \mathrm {sgn}\left (\cos \left (-\frac {1}{4} \, \pi + \frac {1}{2} \, d x + \frac {1}{2} \, c\right )\right ) \sin \left (-\frac {1}{4} \, \pi + \frac {1}{2} \, d x + \frac {1}{2} \, c\right )\right )}}{{\left (2 \, \sin \left (-\frac {1}{4} \, \pi + \frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} - 1\right )}^{3}}\right )} \sqrt {a}}{96 \, d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [F]
time = 0.00, size = -1, normalized size = -0.01 \begin {gather*} \int \frac {{\cos \left (c+d\,x\right )}^4\,{\left (a+a\,\sin \left (c+d\,x\right )\right )}^{3/2}}{{\sin \left (c+d\,x\right )}^4} \,d x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________